package com.organize.res;

import com.autumn.util.ResourceUtils;
import com.autumn.zero.authorization.plugins.data.ResourcesModuleData;

import java.util.List;

/**
 * 组织资源帮助
 * <p>
 * </p>
 *
 * @description TODO
 * @author: 老码农
 * @create: 2020-10-17 16:41
 **/
public class OrganizeResUtils {

    /**
     * 基础路径
     */
    public static final String BASE_PATH = ResourceUtils.convertClassNameToResourcePath(OrganizeResUtils.class.getPackage().getName());

    /**
     * 资源模块路径
     */
    public static final String ORG_RESOURCES_MODULE_DATA_PATH = BASE_PATH + "/OrganizeResourcesModule.json";

    /**
     * 读取资源模块路径
     * <p>
     * 只做一个权限配置示例
     * </p>
     *
     * @return
     */
    public static List<ResourcesModuleData> readOrgResourcesModules() {
        return ResourceUtils.readResList(ORG_RESOURCES_MODULE_DATA_PATH, ResourcesModuleData.class);
    }
}
